{extend name='admin@main'}

{block name="button"}

{if auth("some_confirm")}
<button data-batch='{:url("some_confirm")}?table=body' data-rule="ids#{key}" class='layui-btn layui-btn-sm layui-btn-normal'>批量打款</button>
{/if}

{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='pay_order/body_index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-center nowrap'>仓库名称</th>
            <th class='text-center nowrap'>属性</th>
            <th class='text-center nowrap'>主体名称</th>
            <th class='text-center nowrap'>负责人姓名</th>
            <th class='text-left nowrap'>身份证号</th>
            <th class='text-left nowrap'>手机号</th>
            <th class='text-left nowrap'>收款信息</th>
            <th class='text-left nowrap'>完成件数</th>
            <th class='text-left nowrap'>总金额</th>
            <th class='text-left nowrap'>扣罚金额</th>
            <th class='text-left nowrap'>应发金额</th>
            <th class='text-left nowrap'>已支付金额</th>
            <th class='text-left nowrap'>待支付金额</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}-{$vo.ware_house_id}-{$vo.wait_pay_price}' type='checkbox'></label>
            </td>
            <td class='text-center nowrap'>{$vo.wh_name|default=''}</td>
            <td class='text-center nowrap'>
                {eq name='vo.att' value='0'}<span class="layui-badge layui-bg-blue">车队</span>{/eq}
                {eq name='vo.att' value='1'}<span class="layui-badge layui-bg-orange">个人</span>{/eq}
                {eq name='vo.att' value='2'}<span class="layui-badge layui-bg-green">劳务</span>{/eq}
                {eq name='vo.att' value='3'}<span class="layui-badge layui-bg-gray">自招</span>{/eq}
            </td>
            <td class='text-center nowrap'>{$vo.body_name|default=''}</td>
            <td class='text-center nowrap'>{$vo.name|default='-'}</td>
            <td class='text-left nowrap'>{$vo.ID_number|default='-'}</td>
            <td class='text-left nowrap'>{$vo.phone|default='-'}</td>
            <td class='text-left nowrap'>{$vo.pay_info|default='-'}</td>
            <td class='text-left nowrap'>{$vo.sum|default='-'}</td>
            <td class='text-left nowrap'>{$vo.sum_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.fine_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.reality_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.complete_pay_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.wait_pay_price|default='-'}</td>
            <td class='text-left nowrap'>

                {if auth("confirm")}
                <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="确认打款" data-modal='{:url("confirm")}?id={$vo.id}&wait_pay_price={$vo.wait_pay_price}&ware_house_id={$vo.ware_house_id}&table=body'>确认打款</a>
                {/if}

                {if auth("pay_log_index")}
                <a class="layui-btn layui-btn-sm" data-open='{:url("pay_log/index")}?id={$vo.id}&table=body&ware_house_id={$vo.ware_house_id}&back=1'>支付记录</a>
                {/if}

                {if auth("order_detail")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-open='{:url("order_detail/index")}?ware_house_id={$vo.ware_house_id}&body_id={$vo.id}&back=1'>明细</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
